home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 November / CHIP Kasım 1997.iso / ARACLAR / TER500 / 500TER._XE / SCRIPT.EXE / SHOWTEXT.TSL < prev    next >
Encoding:
Text File  |  1995-08-06  |  1.1 KB  |  41 lines

  1. % -----------------------------------------------------------------------------
  2. % Text file demonstration                              *TERMINATE PRESCRIPTION*
  3. % -----------------------------------------------------------------------------
  4. %
  5. %  Version          : 1.00
  6. %  Filename         : SHOWTEXT.TSL
  7. %  Company          : SerWiz Comm
  8. %  Programmer       : Bo Bendtsen
  9. %  Module created   : 06 Aug 1995
  10. %  Latest revision  : 06 Aug 1995
  11. %  Language/version : Terminate Prescription 1.00
  12. %  Remarks          : Opens and shows the contents of a text file
  13. %
  14. % -----------------------------------------------------------------------------
  15.  
  16. ClearScreen
  17. Window 1,1,80,20,6,0,23,23,27," Show text file "
  18. WriteAStr 2,0,31," Esc to Abort "
  19.  
  20. Set Key=0
  21. Set Filename = "C:\AUTOEXEC.BAT"
  22. Repeat
  23.   Set Filename=Input(1,18,41,23,31,Filename)
  24.   PrintLn
  25.   If Key<>27
  26.     OpenText 1,Filename,0
  27.     If IOResult=0
  28.       Set IOResult=0
  29.       While EndofTextFile(1)=0
  30.         PrintLn readtext(1)
  31.       EndWhile
  32.       CloseText 1
  33.     Else
  34.       PrintLn "Could not open file"
  35.     Endif
  36.   Endif
  37. Until Key=27
  38.  
  39. RemoveWindow
  40.  
  41.